Apply patches from upstream to make ostree buildable on Debian jessie
authorSimon McVittie <smcv@debian.org>
Wed, 15 Jun 2016 18:20:04 +0000 (14:20 -0400)
committerSimon McVittie <smcv@debian.org>
Wed, 15 Jun 2016 18:20:04 +0000 (14:20 -0400)
debian/changelog
debian/patches/Build-on-older-versions-of-glib.patch [new file with mode: 0644]
debian/patches/series
debian/patches/tests-Fix-build-with-old-glib.patch [new file with mode: 0644]

index 8c5ff9a1825cffc05c327ceea25cbb8a300e0d09..8d1623aa0f1d8afe2461dd683f368bc6540261ee 100644 (file)
@@ -1,3 +1,11 @@
+ostree (2016.5-5) UNRELEASED; urgency=medium
+
+  * d/p/Build-on-older-versions-of-glib.patch,
+    d/p/tests-Fix-build-with-old-glib.patch: apply patches from
+    upstream to make ostree buildable on Debian jessie
+
+ -- Simon McVittie <smcv@debian.org>  Wed, 15 Jun 2016 14:05:53 -0400
+
 ostree (2016.5-4) unstable; urgency=medium
 
   * d/p/test-sysroot.js-set-strict-mode-when-sourcing-libtest.sh.patch,
diff --git a/debian/patches/Build-on-older-versions-of-glib.patch b/debian/patches/Build-on-older-versions-of-glib.patch
new file mode 100644 (file)
index 0000000..01bfcbd
--- /dev/null
@@ -0,0 +1,183 @@
+From: Alexander Larsson <alexl@redhat.com>
+Date: Wed, 25 May 2016 11:00:19 +0200
+Subject: Build on older versions of glib
+MIME-Version: 1.0
+Content-Type: text/plain; charset="utf-8"
+Content-Transfer-Encoding: 8bit
+
+Various places need to include libglnx.h for the autoptr backport
+fallbacks to be there before ostree-autocleanups.h is included.
+
+This fixes the build on centos7ยท
+
+Closes: #309
+Approved by: giuseppe
+Origin: upstream, 2016.6, commit:d36862479860df5b133dca51dbf0607bbe849a5b
+---
+ src/libostree/ostree-core.c            | 2 +-
+ src/libostree/ostree-diff.c            | 1 +
+ src/libostree/ostree-fetcher.c         | 1 +
+ src/libostree/ostree-repo-pull.c       | 1 +
+ src/libostree/ostree-repo-traverse.c   | 1 +
+ src/ostree/ot-admin-builtin-instutil.c | 2 +-
+ src/ostree/ot-admin-functions.c        | 1 +
+ src/ostree/ot-builtin-admin.c          | 2 +-
+ src/ostree/ot-editor.c                 | 2 +-
+ src/ostree/ot-main.c                   | 2 +-
+ src/ostree/ot-main.h                   | 2 +-
+ 11 files changed, 11 insertions(+), 6 deletions(-)
+
+diff --git a/src/libostree/ostree-core.c b/src/libostree/ostree-core.c
+index ded5e97..de84419 100644
+--- a/src/libostree/ostree-core.c
++++ b/src/libostree/ostree-core.c
+@@ -26,11 +26,11 @@
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <gio/gfiledescriptorbased.h>
++#include "libglnx.h"
+ #include "ostree.h"
+ #include "ostree-core-private.h"
+ #include "ostree-chain-input-stream.h"
+ #include "otutil.h"
+-#include "libglnx.h"
+ #define ALIGN_VALUE(this, boundary) \
+   (( ((unsigned long)(this)) + (((unsigned long)(boundary)) -1)) & (~(((unsigned long)(boundary))-1)))
+diff --git a/src/libostree/ostree-diff.c b/src/libostree/ostree-diff.c
+index 4b73346..8496102 100644
+--- a/src/libostree/ostree-diff.c
++++ b/src/libostree/ostree-diff.c
+@@ -22,6 +22,7 @@
+ #include "config.h"
++#include "libglnx.h"
+ #include "ostree.h"
+ #include "otutil.h"
+diff --git a/src/libostree/ostree-fetcher.c b/src/libostree/ostree-fetcher.c
+index d7915ba..55deee8 100644
+--- a/src/libostree/ostree-fetcher.c
++++ b/src/libostree/ostree-fetcher.c
+@@ -25,6 +25,7 @@
+ #include <gio/gfiledescriptorbased.h>
+ #include <gio/gunixoutputstream.h>
++#include "libglnx.h"
+ #include "ostree-fetcher.h"
+ #ifdef HAVE_LIBSOUP_CLIENT_CERTS
+ #include "ostree-tls-cert-interaction.h"
+diff --git a/src/libostree/ostree-repo-pull.c b/src/libostree/ostree-repo-pull.c
+index eef5f03..f87b709 100644
+--- a/src/libostree/ostree-repo-pull.c
++++ b/src/libostree/ostree-repo-pull.c
+@@ -22,6 +22,7 @@
+ #include "config.h"
++#include "libglnx.h"
+ #include "ostree.h"
+ #include "ostree-core-private.h"
+ #include "ostree-repo-private.h"
+diff --git a/src/libostree/ostree-repo-traverse.c b/src/libostree/ostree-repo-traverse.c
+index bb437c3..503ab32 100644
+--- a/src/libostree/ostree-repo-traverse.c
++++ b/src/libostree/ostree-repo-traverse.c
+@@ -22,6 +22,7 @@
+ #include "config.h"
++#include "libglnx.h"
+ #include "ostree.h"
+ #include "otutil.h"
+diff --git a/src/ostree/ot-admin-builtin-instutil.c b/src/ostree/ot-admin-builtin-instutil.c
+index 1087b38..88894a6 100644
+--- a/src/ostree/ot-admin-builtin-instutil.c
++++ b/src/ostree/ot-admin-builtin-instutil.c
+@@ -20,11 +20,11 @@
+ #include "config.h"
++#include "ot-main.h"
+ #include "ot-builtins.h"
+ #include "ot-admin-instutil-builtins.h"
+ #include "ot-admin-builtins.h"
+ #include "ot-admin-functions.h"
+-#include "ot-main.h"
+ #include "ostree.h"
+ #include <glib/gi18n.h>
+diff --git a/src/ostree/ot-admin-functions.c b/src/ostree/ot-admin-functions.c
+index bc9034e..ed4dfdf 100644
+--- a/src/ostree/ot-admin-functions.c
++++ b/src/ostree/ot-admin-functions.c
+@@ -22,6 +22,7 @@
+ #include "config.h"
++#include "libglnx.h"
+ #include "ot-admin-functions.h"
+ #include "otutil.h"
+ #include "ostree.h"
+diff --git a/src/ostree/ot-builtin-admin.c b/src/ostree/ot-builtin-admin.c
+index 8b86617..7e7b04b 100644
+--- a/src/ostree/ot-builtin-admin.c
++++ b/src/ostree/ot-builtin-admin.c
+@@ -22,10 +22,10 @@
+ #include "config.h"
++#include "ot-main.h"
+ #include "ot-builtins.h"
+ #include "ot-admin-builtins.h"
+ #include "ot-admin-functions.h"
+-#include "ot-main.h"
+ #include "ostree.h"
+ #include "ostree-repo-file.h"
+diff --git a/src/ostree/ot-editor.c b/src/ostree/ot-editor.c
+index 4c29c81..2e04584 100644
+--- a/src/ostree/ot-editor.c
++++ b/src/ostree/ot-editor.c
+@@ -22,9 +22,9 @@
+ #include "config.h"
++#include "libglnx.h"
+ #include "ot-editor.h"
+ #include "libgsystem.h"
+-#include "libglnx.h"
+ #include <sys/wait.h>
+ #include <string.h>
+diff --git a/src/ostree/ot-main.c b/src/ostree/ot-main.c
+index 93f841d..18c1323 100644
+--- a/src/ostree/ot-main.c
++++ b/src/ostree/ot-main.c
+@@ -27,9 +27,9 @@
+ #include <stdlib.h>
+ #include <string.h>
++#include "ot-main.h"
+ #include "ostree.h"
+ #include "ot-admin-functions.h"
+-#include "ot-main.h"
+ #include "otutil.h"
+ static char *opt_repo;
+diff --git a/src/ostree/ot-main.h b/src/ostree/ot-main.h
+index 32620c5..3bb7524 100644
+--- a/src/ostree/ot-main.h
++++ b/src/ostree/ot-main.h
+@@ -22,8 +22,8 @@
+ #pragma once
+-#include "ostree.h"
+ #include "libglnx.h"
++#include "ostree.h"
+ typedef enum {
+   OSTREE_BUILTIN_FLAG_NONE = 0,
index a81a238dd9ac5b29be7627029d4699f7bba52006..d4099712c72d457d4f7b846f3660ac6ac172ec53 100644 (file)
@@ -3,3 +3,5 @@ test-parent-this-test-requires-user-xattrs.patch
 tests-Use-strict-mode-by-default-for-C-tests.patch
 test-sysroot.js-set-strict-mode-when-sourcing-libtest.sh.patch
 Link-libreaddir-rand-to-libdl.patch
+Build-on-older-versions-of-glib.patch
+tests-Fix-build-with-old-glib.patch
diff --git a/debian/patches/tests-Fix-build-with-old-glib.patch b/debian/patches/tests-Fix-build-with-old-glib.patch
new file mode 100644 (file)
index 0000000..3100352
--- /dev/null
@@ -0,0 +1,26 @@
+From: Alexander Larsson <alexl@redhat.com>
+Date: Fri, 20 May 2016 10:59:59 +0200
+Subject: tests: Fix build with old glib
+
+test-checksum.c was using g_autofree without including libglnx.h which
+has the backport for that.
+
+Closes: #304
+Approved by: cgwalters
+Origin: upstream, 2016.6, commit:86ac8062f5311fe94ef4096f4e136ce993d5e9b2
+---
+ tests/test-checksum.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/tests/test-checksum.c b/tests/test-checksum.c
+index 25d3c37..e7fd7be 100644
+--- a/tests/test-checksum.c
++++ b/tests/test-checksum.c
+@@ -20,6 +20,7 @@
+ #include "config.h"
++#include "libglnx.h"
+ #include "libgsystem.h"
+ #include <glib.h>
+ #include <stdlib.h>